Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix python binding for concat, concat_ws, and random #768

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

jimexist
Copy link
Member

@jimexist jimexist commented Jul 22, 2021

Which issue does this PR close?

fix python binding for concat, concat_ws, and random

Closes #226

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

>>> import datafusion
>>> from datafusion import functions as f
>>> dir(f)
['__all__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'abs', 'acos', 'array', 'ascii', 'asin', 'atan', 'avg', 'bit_length', 'btrim', 'ceil', 'character_length', 'chr', 'col', 'concat', 'concat_ws', 'cos', 'count', 'exp', 'floor', 'in_list', 'initcap', 'left', 'lit', 'ln', 'log10', 'log2', 'lower', 'lpad', 'ltrim', 'max', 'md5', 'min', 'now', 'octet_length', 'random', 'regexp_replace', 'repeat', 'replace', 'reverse', 'right', 'round', 'rpad', 'rtrim', 'sha224', 'sha256', 'sha384', 'sha512', 'signum', 'sin', 'split_part', 'sqrt', 'starts_with', 'strpos', 'substr', 'sum', 'tan', 'to_hex', 'translate', 'trim', 'trunc', 'udaf', 'udf', 'upper']
>>> f.concat(f.lit(1), f.lit(2))
<builtins.Expression object at 0x1026fea30>
>>> f.concat(f.lit(1), f.lit(2), f.lit(3))
<builtins.Expression object at 0x1026feb70>

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jimexist -- I wonder if it would be helpful in the future to add a python level test for concat and concat_ws

@alamb alamb merged commit 2a4f94e into apache:master Jul 23, 2021
@jimexist jimexist deleted the fix-python branch July 24, 2021 00:56
@houqp houqp added the python label Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concat from Dataframe API no longer accepts multiple expressions
3 participants